package com.qf.common.core.util;

/**
 * 天--道--酬--勤
 *
 * @author LiangGaoQiang
 * @ClassName UserUtils
 * @Date: 2025/5/26 14:17
 * @Description: 描述
 */
/**
 * ThreadLocal工具类，用于存储当前线程的用户ID
 * @author GaoQiangLiang
 */
public class UserUtils {
    private static ThreadLocal<Integer> threadLocal = new ThreadLocal<>();

    public static Integer getUid() {
        return threadLocal.get();
    }
    public static void setUid(Integer uid) {
        threadLocal.set(uid);
    }
    public static void remove() {
        threadLocal.remove();
    }
}
